<template>
  <div class="foodlist">
    <div class="title">
      <h1>食材清单</h1>
      <ul>
        <li v-for="(item, index) in list" :key="index">
          <h3 :class="{ keyword: item.major_name[0].is_keyword }">
            {{ item.title }}
          </h3>
          <span>{{ item.note }}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ["list"],
};
</script>

<style lang="less" scoped>
.foodlist {
  padding: 5px 15px;
  h1 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 5px;
    .keyword{
        color: royalblue;
    }
  }
  ul {
    li {
      padding: 5px 0;
      font-size: 13px;
      display: flex;
      justify-content: space-between;
    }
  }
}
</style>